<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta name="viewport"
    content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  <meta name="renderer" content="webkit" />
  <meta name="keywords" content="" />
  <meta name="description" content="" />
  <meta name="apple-mobile-web-app-capable" content="yes" />
  <meta name="format-detection" content="telephone=no,email=no" />
  <meta name="msapplication-tap-highlight" content="no" />
  <link type="image/x-icon" href="/favicon.ico" rel="icon" />
  <title>Title</title>
  <link rel="stylesheet" type="text/css" href="css/reset.css" />
  <link rel="stylesheet" type="text/css" href="css/owl.carousel.css" />
  <link rel="stylesheet" type="text/css" href="css/owl.theme.default.min.css" />
  <link rel="stylesheet" type="text/css" href="css/common.min.css">
  <script src="js/rem.js"></script>
  <!--[if lt IE 9]>
        <script src="js/html5shiv.min.js"></script>
        <script src="js/respond.min.js"></script>
        <![endif]-->
</head>

<body class="company-body common-body">
  <div id="header"></div>
  <div class="banner-company">
    <img src="images/company_banner.png" alt="">
  </div>
  <div class="company-box branchIntroduction-box padding60">
    <div class="container">
      <div class="immediate_detail">
        <h2 class="title">长沙分公司</h2>
        <div class="content">
          <img src="images/immediate_detail.png" alt="">
        </div>
      </div>
    </div>
    <div class="container bottom-btn clearfix">
      <div class="left fl">
        <a href="javascript:;">上一篇</a>
        <a href="javascript:;">下一篇</a>
      </div>
      <div class="right fr">
        <a href="javascript:;" onclick="back()">返回 &gt;</a>
      </div>
    </div>
  </div>
  <div id="footer"></div>
  <script src="js/jquery.min.js"></script>
  <script src="js/echarts.min.js"></script>
  <script src="js/china.js"></script>
  <script src="js/commin.js"></script>
  <script>
    var chart = echarts.init(document.getElementById('main'));
    var options = {
      title: {
        text: '公司分布',
        left: 'center',
        textStyle: {
          color: '#fff',
          fontSize: 16,
          fontWeight: 'normal',
          fontFamily: "Microsoft YaHei"
        },
      },
      tooltip: {
        show: true,
        showContent: true,
        alwaysShowContent: true,
        triggerOn: 'click',
        formatter: function (params) {

          console.log(params)
          console.log("===========================")
          console.log(options.series[0].data)
          for (var i = 0; i < options.series[0].data.length; i++) {
            if (options.series[0].data[i].name == params) {
              return params + ":" + options.series[0].data[i].value + "起";
            }
          }
        },
      },
      series: [
        {
          name: '分公司',
          type: 'map',
          mapType: 'china', // 自定义扩展图表类型
          zoom: 1.2,
          label: {
            show: true
          },
          data: [
            { name: '秦皇岛', value: 136 },
            { name: '株洲', value: 143 },
            { name: '石家庄', value: 147 }
          ],

        }
      ]
    }
    chart.setOption(options);
  </script>
</body>

</html>